package com.cd2cd.mapper;

import com.cd2cd.domain.ProFun;
import com.cd2cd.mapper.gen.SuperProFunMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProFunMapper extends SuperProFunMapper {

    List<Map<String, String>> selectMethodsByCid(@Param("cid") Long cid);

    @Select("select * from pro_fun where cid in (select id from pro_file where file_type = 'controller' and project_id = #{projectId})")
    @ResultMap("BaseResultMap")
    List<ProFun> selectByProjectId(@Param("projectId")Long projectId);
}